



//
//  MBNavigationLeftBar.m
//  房源详情-小区详情
//
//  Created by MB__Lee on 2018/5/29.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBNavigationLeftBar.h"

@interface MBNavigationLeftBar()

@property(nonatomic,weak)UIViewController *vc;

@end

@implementation MBNavigationLeftBar
-(void)MBNavigationLeftBar_withVC:(UIViewController *)vc{
    
    _vc = vc;
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setImage:[UIImage imageNamed:@"back_icon"] forState:UIControlStateNormal];
    
    [btn addTarget:self action:@selector(backBTN) forControlEvents:UIControlEventTouchUpInside];
    
    UIBarButtonItem *batItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
    vc.navigationItem.leftBarButtonItem = batItem;
    

    
}
-(void)backBTN{
    
    [_vc.navigationController popViewControllerAnimated:YES];
    
}

@end
